<template>
<section @click="clickCurrent('current')" @mousedown="clickCurrent('dragging')">
    <div class="es-form-item">
            <div>
              <div class="form-label">日期</div>
              <div style="margin-top:20px;" class="stylebox flex-row flex-align-c">
                  <el-input v-model="custormItemData.name" size="small" placeholder="请输入标题"></el-input>
              </div>
            </div>
    </div>
    <div class="es-form-item">
            <div class="form-label">提示语</div>
            <div style="margin-top:20px;" class="stylebox flex-row flex-align-c">
                <div style="width:50px;">内容</div>
                <el-input v-model="custormItemData.tips" size="small" placeholder="请输入提示语"></el-input>
            </div>
    </div>
    <div class="es-form-item">
            <div class="form-label">默认值</div>
           <el-radio-group v-model="custormItemData.conceal" @change="concealbtn">
                <div style="margin-left:50px;">
                    <el-radio label="1">显示</el-radio>
                    <el-radio label="2">隐藏</el-radio>
                </div>
            </el-radio-group>
                 <el-radio-group v-model="custormItemData.datatext" v-if="custormItemData.conceal=='1'">
                    <div style="margin:10px 0px 0px 50px;">
                        <el-radio label="1">当天日期</el-radio>
                        <el-radio label="2">指定日期</el-radio>
                    </div>
                      <div class="block" v-if="custormItemData.datatext=='2'" style="margin:10px 0px 0px 50px;">
                        <el-date-picker
                        v-model="custormItemData.default"
                        type="date"
                        value-format="yyyy-MM-dd"
                        placeholder="选择日期">
                        </el-date-picker>
                    </div>
              </el-radio-group>
    </div>

      <div class="es-form-item">
            <div class="form-label">是否必填</div>
            <!-- <div style="margin-top:20px;" class="stylebox flex-row flex-align-c">
                <div style="width:50px;">内容</div>
                <el-input v-model="custormItemData.tips" size="small" ></el-input>
            </div> -->
             <el-radio-group v-model="custormItemData.required">
                <div style="margin-left:50px;">
                    <el-radio label="1">是</el-radio>
                    <el-radio label="2">否</el-radio>
                </div>
              </el-radio-group>
    </div>
</section>

</template>

<script>
import defaultConfig from './utils/showConfig'
export default {
  mixins: [defaultConfig.mixins],
  props: {
    defaultConfig: {
      type: Object,
      default: function() {
        return defaultConfig
      }
    }
  },

  methods: {
    concealbtn() {
      if (this.custormItemData.conceal == '2') {
        this.custormItemData.appointdata = ''
      }
    }
  }
}
</script>

<style lang="scss" scoped>
    .es-form-item{
          padding: 20px 23px;
          font-size: 12px;
          background: #f8f8fa;
          border-radius: 6px;
          margin-bottom: 10px;
    }

</style>
